package com.example.myapplication;

import android.content.Context;
import android.text.Html;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;

import androidx.annotation.NonNull;
import androidx.recyclerview.widget.RecyclerView;

import org.jetbrains.annotations.NotNull;

import java.util.List;

//public class ContactAdapter extends RecyclerView.Adapter<ContactAdapter.MyViewHolder> {
//    private Context mContext;
//    private List<ContactInfo> contactInfoList;
//    public ContactAdapter(Context context, List<ContactInfo> contactInfoList){
//        this.mContext=context;
//        this.contactInfoList=contactInfoList;
//    }
//
//    @Override
//    public MyViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
//        MyViewHolder holder = new MyViewHolder(LayoutInflater.from(mContext).inflate(R.layout.contact_item,parent,false));
//        return holder;
//    }
//    @Override
//    public void onBindViewHolder(MyViewHolder holder, int position){
//        holder.tv_name.setText(contactInfoList.get(position).getContactName());
//        holder.tv_phone.setText(contactInfoList.get(position).getPhoneNumber());
//    }
//
//    @Override
//    public int getItemCount() {
//        return contactInfoList.size();
//    }
//
//    class MyViewHolder extends  RecyclerView.ViewHolder{
//        TextView tv_name,tv_phone;
//        Html.ImageGetter iv_photo;
//        public MyViewHolder(View itemView) {
//            super(itemView);
//        }
//    }
//}
